﻿@using Choucius.Boilerplate9.Devices.Dto
@using Choucius.Boilerplate9.Web.Models.Common.Modals
@model DeviceDto
@{
    Layout = null;
}
@await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditDevice")))
<form name="DeviceEditForm" role="form" class="form-horizontal">
    <input type="hidden" name="Id" value="@Model.Id" />
    <div class="modal-body">
        <div class="form-group row required">
            <label class="col-md-3 col-form-label" for="SerialNo">@L("SerialNo")</label>
            <div class="col-md-9">
                <input id="SerialNo" type="text" class="form-control" name="SerialNo" value="@Model.SerialNo" required maxlength="32" minlength="2">
            </div>
        </div>
        <div class="form-group row required">
            <label class="col-md-3 col-form-label" for="DeviceName">@L("DeviceName")</label>
            <div class="col-md-9">
                <input id="DeviceName" type="text" class="form-control" name="DeviceName" value="@Model.DeviceName" required maxlength="32">
            </div>
        </div>
        <div class="form-group row required">
            <label class="col-md-3 col-form-label" for="PartNo">@L("PartNo")</label>
            <div class="col-md-9">
                <input id="PartNo" type="text" class="form-control" name="PartNo" value="@Model.PartNo" required maxlength="16" minlength="2">
            </div>
        </div>
        <div class="form-group row required">
            <label class="col-md-3 col-form-label" for="Description">@L("Description")</label>
            <div class="col-md-9">
                <input id="Description" type="text" class="form-control" name="Description" value="@Model.Description" required maxlength="128">
            </div>
        </div>
    </div>
    @await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
</form>

<script src="~/view-resources/Views/Devices/_EditModal.js" asp-append-version="true"></script>
